diffdiffall<-read.dta("event_study_clean.dta")
attach(diffdiffall)
color.names<-c( "grey50",  "black")
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12)
+
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) + theme(legend.position="bottom") +
scale_shape_manual(values=c(16, 15))+
labs(x="Subgroup", y="Outcomes", title="") +
labs(shape="Rule out 10%?", colour="Statistically Significant?")+
theme(text = element_text(size=22))
plot1
ggsave(plot1, file="event_conservative.pdf", width=8, height=10, scale=2)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr, colour=factor(Group)),  width=0, size=1)
plot1
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1)
plot1
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55))
plot1
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7)
plot1
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("event_study_clean.dta")
attach(diffdiffall)
color.names<-c( "grey50",  "black")
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))
plot1
ggsave(plot1, file="event_conservative.pdf", width=8, height=10, scale=2)
ggsave(plot1, file="event_conservative.pdf", width=8, height=5, scale=2)
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("event_study_clean.dta")
attach(diffdiffall)
color.names<-c( "grey50",  "black")
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))
plot1
ggsave(plot1, file="event_conservative.pdf", width=8, height=5, scale=2)
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("event_study_clean.dta")
attach(diffdiffall)
color.names<-c( "grey50",  "black")
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="event_conservative.pdf", width=8, height=5, scale=2)
estimates <- list("event_study_sgroup_favorability_jews_clean", "event_study_sgroup_favorability_white_men_clean", "event_study_sgroup_favorability_lgbt_clean", "event_study_sgroup_favorability_undocumented_clean",
"event_study_sgroup_favorability_the_police_clean", "event_study_sgroup_favorability_labor_unions_clean", "event_study_sgroup_favorability_muslims_clean",
"event_study_sgroup_favorability_socialists_clean", "event_study_sgroup_favorability_evangelicals_clean", "event_study_sgroup_favorability_asians_clean",
"event_study_sgroup_favorability_latinos_clean", "event_study_sgroup_favorability_blacks_clean", "event_study_sgroup_favorability_whites_clean",
"event_study_sgender_resentment_clean", "event_study_sracial_resentment_clean", "event_study_sgroup_favorability_republicans_clean",
"event_study_sgroup_favorability_democrats_clean", "event_study_scand_favorability_biden_clean", "event_study_scand_favorability_trump_clean",
"event_study_sconservatisim_clean", "event_study_sconservative_policy_clean", "event_study_c_limit_magazines_clean", "event_study_c_ban_assault_rifles_clean",
"event_study_c_ban_guns_clean", "event_study_c_deportation_clean", "event_study_c_dreamers_clean", "event_study_c_path_to_citizenship_clean",
"event_study_c_health_subsidies_clean", "event_study_c_public_option_clean", "event_study_c_gov_insurance_clean", "event_study_c_late_term_abortion_clean",
"event_study_c_abortion_never_clean", "event_study_c_college_clean", "event_study_c_raise_upper_tax_clean", "event_study_c_estate_tax_clean",
"event_study_c_guns_bg_clean", "event_study_c_cap_carbon_clean", "event_study_c_wall_clean")
for (x in estimates) {
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("X.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="X.pdf", width=8, height=5, scale=2)
}
for (x in estimates) {
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("x.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="x.pdf", width=8, height=5, scale=2)
}
estimates <- list("event_study_sgroup_favorability_jews_clean", "event_study_sgroup_favorability_white_men_clean", "event_study_sgroup_favorability_lgbt_clean", "event_study_sgroup_favorability_undocumented_clean",
"event_study_sgroup_favorability_the_police_clean", "event_study_sgroup_favorability_labor_unions_clean", "event_study_sgroup_favorability_muslims_clean",
"event_study_sgroup_favorability_socialists_clean", "event_study_sgroup_favorability_evangelicals_clean", "event_study_sgroup_favorability_asians_clean",
"event_study_sgroup_favorability_latinos_clean", "event_study_sgroup_favorability_blacks_clean", "event_study_sgroup_favorability_whites_clean",
"event_study_sgender_resentment_clean", "event_study_sracial_resentment_clean", "event_study_sgroup_favorability_republicans_clean",
"event_study_sgroup_favorability_democrats_clean", "event_study_scand_favorability_biden_clean", "event_study_scand_favorability_trump_clean",
"event_study_sconservatisim_clean", "event_study_sconservative_policy_clean", "event_study_c_limit_magazines_clean", "event_study_c_ban_assault_rifles_clean",
"event_study_c_ban_guns_clean", "event_study_c_deportation_clean", "event_study_c_dreamers_clean", "event_study_c_path_to_citizenship_clean",
"event_study_c_health_subsidies_clean", "event_study_c_public_option_clean", "event_study_c_gov_insurance_clean", "event_study_c_late_term_abortion_clean",
"event_study_c_abortion_never_clean", "event_study_c_college_clean", "event_study_c_raise_upper_tax_clean", "event_study_c_estate_tax_clean",
"event_study_c_guns_bg_clean", "event_study_c_cap_carbon_clean", "event_study_c_wall_clean")
for (x in estimates) {
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("x.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="x.pdf", width=8, height=5, scale=2)
}
for (x in estimates) {
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta("`x'.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="`x'.pdf", width=8, height=5, scale=2)
}
for (x in estimates) {
diffdiffall<-read.dta("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/`x'.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="`x'.pdf", width=8, height=5, scale=2)
}
fruits <- list("apple", "banana", "cherry")
for (x in fruits) {
if (x == "banana") {
next
}
print(x)
}
for (i in estimates) {
diffdiffall<-read.dta("i.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=i.pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta("[i].dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=[i].pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta("[i].dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=i.pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta("[[i]].dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=[[i]].pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta(".dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=".pdf", width=8, height=5, scale=2)
}
estimates
for (i in estimates) {
diffdiffall<-read.dta("(i).dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="(i).pdf", width=8, height=5, scale=2)
}
estimates <- list("event_study_sgroup_favorability_jews_clean", "event_study_sgroup_favorability_white_men_clean", "event_study_sgroup_favorability_lgbt_clean", "event_study_sgroup_favorability_undocumented_clean",
"event_study_sgroup_favorability_the_police_clean", "event_study_sgroup_favorability_labor_unions_clean", "event_study_sgroup_favorability_muslims_clean",
"event_study_sgroup_favorability_socialists_clean", "event_study_sgroup_favorability_evangelicals_clean", "event_study_sgroup_favorability_asians_clean",
"event_study_sgroup_favorability_latinos_clean", "event_study_sgroup_favorability_blacks_clean", "event_study_sgroup_favorability_whites_clean",
"event_study_sgender_resentment_clean", "event_study_sracial_resentment_clean", "event_study_sgroup_favorability_republicans_clean",
"event_study_sgroup_favorability_democrats_clean", "event_study_scand_favorability_biden_clean", "event_study_scand_favorability_trump_clean",
"event_study_sconservatisim_clean", "event_study_sconservative_policy_clean", "event_study_c_limit_magazines_clean", "event_study_c_ban_assault_rifles_clean",
"event_study_c_ban_guns_clean", "event_study_c_deportation_clean", "event_study_c_dreamers_clean", "event_study_c_path_to_citizenship_clean",
"event_study_c_health_subsidies_clean", "event_study_c_public_option_clean", "event_study_c_gov_insurance_clean", "event_study_c_late_term_abortion_clean",
"event_study_c_abortion_never_clean", "event_study_c_college_clean", "event_study_c_raise_upper_tax_clean", "event_study_c_estate_tax_clean",
"event_study_c_guns_bg_clean", "event_study_c_cap_carbon_clean", "event_study_c_wall_clean")
for (& in estimates) {
diffdiffall<-read.dta("&.dta")
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file="&.pdf", width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta(i.dta)
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=i.pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta(i)
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=i.pdf, width=8, height=5, scale=2)
}
diffdiffall<-read.dta(event_study_sgroup_favorability_the_police_clean)
diffdiffall<-read.dta(event_study_sgroup_favorability_the_police_clean.dta)
getwd
setwd("/Users/johnholbein/Dropbox (Batten School @ UVA)/Work/Nationscape Data/Sleep/findings/")
diffdiffall<-read.dta(event_study_sgroup_favorability_the_police_clean)
for (i in estimates) {
diffdiffall<-read.dta(estimates[[1]])
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
}
getwd()
estimates[[1]]
for (i in estimates) {
diffdiffall<-read.dta(paste0(estimates[[1]], “.dta”))
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=i.pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta(paste0(estimates[[1]], ".dta"))
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=i.pdf, width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta(paste0(estimates[[1]], ".dta"))
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1}
for (i in estimates) {
diffdiffall<-read.dta(paste0(estimates[[1]], ".dta"))
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=paste0(estimates[[1]], ".pdf"), width=8, height=5, scale=2)
}
for (i in estimates) {
diffdiffall<-read.dta(paste0(estimates[[1]], ".dta"))
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=paste0(estimates[[1]], ".pdf"), width=8, height=5, scale=2)
print(i)
}
diffdiffall<-read.dta(paste0(estimates[[1]], ".dta"))
attach(diffdiffall)
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-0.55, 0.55)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=paste0(estimates[[1]], ".pdf"), width=8, height=5, scale=2)
i <- 1
for (i in 1:length(estimates)) {
diffdiffall<-read.dta(paste0(estimates[[i]], ".dta"))
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-1, 1)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=paste0(estimates[[i]], ".pdf"), width=8, height=5, scale=2)
print(i)
}
estimates <- list("event_study_sgroup_favorability_jews_clean", "event_study_sgroup_favorability_white_men_clean", "event_study_sgroup_favorability_lgbt_clean", "event_study_sgroup_favorability_undocumented_clean",
"event_study_sgroup_favorability_the_police_clean", "event_study_sgroup_favorability_labor_unions_clean", "event_study_sgroup_favorability_muslims_clean",
"event_study_sgroup_favorability_socialists_clean", "event_study_sgroup_favorability_evangelicals_clean", "event_study_sgroup_favorability_asians_clean",
"event_study_sgroup_favorability_latinos_clean", "event_study_sgroup_favorability_blacks_clean", "event_study_sgroup_favorability_whites_clean",
"event_study_sgender_resentment_clean", "event_study_sracial_resentment_clean", "event_study_sgroup_favorability_republicans_clean",
"event_study_sgroup_favorability_democrats_clean", "event_study_scand_favorability_biden_clean", "event_study_scand_favorability_trump_clean",
"event_study_sconservatisim_clean", "event_study_sconservative_policy_clean", "event_study_c_limit_magazines_clean", "event_study_c_ban_assault_rifles_clean",
"event_study_c_ban_guns_clean", "event_study_c_deportation_clean", "event_study_c_dreamers_clean", "event_study_c_path_to_citizenship_clean",
"event_study_c_health_subsidies_clean", "event_study_c_public_option_clean", "event_study_c_gov_insurance_clean", "event_study_c_late_term_abortion_clean",
"event_study_c_abortion_never_clean", "event_study_c_college_clean", "event_study_c_raise_upper_tax_clean", "event_study_c_estate_tax_clean",
"event_study_c_guns_bg_clean", "event_study_c_cap_carbon_clean", "event_study_c_wall_clean")
i <- 1
for (i in 1:length(estimates)) {
diffdiffall<-read.dta(paste0(estimates[[i]], ".dta"))
plot1<-ggplot(diffdiffall, aes(y=coef,  x=center_day))+
geom_point(data=diffdiffall, color="black", size=12) +
geom_errorbar(aes(ymin=coef-1.96*stderr, ymax=coef+1.96*stderr), color="black",  width=0, size=1) +
scale_y_continuous(limits=c(-1, 1)) +
geom_hline(aes(yintercept=0), colour="black", linetype="dashed", size=1, alpha=0.7) +
geom_vline(aes(xintercept=-1), colour="black", linetype="dotted", size=1, alpha=0.7) +
theme_bw() + theme( axis.line = element_line(colour = "black")) +
scale_colour_manual(values=color.names) +
labs(x="Days Since DST Began", y="Effect (Standardized)", title="") +
theme(text = element_text(size=22))   +    scale_x_continuous(n.breaks = 15)
plot1
ggsave(plot1, file=paste0(estimates[[i]], ".pdf"), width=8, height=5, scale=2)
print(i)
}
